//
//  HouseInfoCell.m
//  PropertyMananger
//
//  Created by Mansion on 17/1/1.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "HouseInfoCell.h"

@implementation HouseInfoCell
- (instancetype)initWithFrame:(CGRect)frame
{

    self = [super initWithFrame:frame];
    if (self) {
        
        UIView * bgView = [[UIView alloc]init];
        [self.contentView addSubview:bgView];
      //  bgView.backgroundColor = BHRandColor;
        
        [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self).with.offset(0);
            make.top.equalTo(self).with.offset(10);
            make.size.mas_equalTo(CGSizeMake(80, 120));
        }];
        
        self.infoImgView = [[UIImageView alloc]init];
        [bgView addSubview:self.infoImgView];
        self.infoImgView.image = [UIImage imageNamed:@"ico_house_inquiry_doorplate"];
        
        [self.infoImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(bgView).with.offset(0);
            make.top.equalTo(self).with.offset(10);
            make.size.mas_equalTo(CGSizeMake(50, 80));
        }];
        
        self.infoTitleLabel = [[UILabel alloc]init];
        [bgView addSubview:self.infoTitleLabel];
      //  self.infoTitleLabel.backgroundColor = BHRandColor;
        
        self.infoTitleLabel.textColor = BHColor(51, 51, 51);
        self.infoTitleLabel.textAlignment = NSTextAlignmentCenter;
        self.infoTitleLabel.font = BHFont(15);
        
        [self.infoTitleLabel  mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(bgView).with.offset(0);
            make.top.equalTo(self.infoImgView.mas_bottom).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW/3 , 25));
            
        }];
        
    //    self.contentView.backgroundColor = BHGrayColor;
        
    }
    return self;
}
@end
